<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>异常日期列表</title>
<link rel="icon" href="<c:url value='/imgs/logo.ico' />" />
<link type="text/css" rel="stylesheet" href="<c:url value='/css/index.css' />" />
<link type="text/css" rel="stylesheet" href="<c:url value='/css/list.css' />" />
<script type="text/javascript" charset="utf-8" src="<c:url value='/scripts/jquery-2.1.0.js'/>"></script>
</head>
<body>
	<div class="container">
		<%@ include file="/jsps/top.jsp"%>
		<div class="main">
			<div class="content">
				<h2>异常日期列表</h2>
				<table class="listTable attend">
					<tr class="listTitle">
						<td>异常日期</td>
						<td>基本操作</td>
					</tr>
					<c:forEach items="${pb.beanList }" var="errorDate">
					<tr>
						<td>${errorDate }</td>
						<td><span class="start">开始统计</span></td>
					</tr>
					</c:forEach>
				</table>
				<%@ include file="/jsps/page.jsp"%>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		$(function(){
			$(".top .title").click(function(){
				location.href="<c:url value='/index.jsp'/>";
			});	
			
			$(".main .content .start").mousedown(function(){
				$(this).css("color","red");
			});
			$(".main .content .start").mouseup(function(){
				$(this).css("color","blue");
			});
			
			$(".main .content .start").click(function(){
				var rundate = $(this).parent().prev().text();
				/* alert(rundate); */
				$.ajax({
					type:"get",
					url:"http://169.88.1.9:8080/recheck",
					data:{"day":rundate},
					dataType:"jsonp",
					jsonp:"jsonpCallBack",
					success:function(data){
						if(data.flag==-1){
							alert(data.msg);
						}else{
							alert("统计成功!");
							window.location.href=window.location.href;
						}
					},
					error:function(){
						alert("操作失败,请重试!");
					}
				});
			});
		});
	</script>
</body>
</html>

